import logging,yaml,yagmail
def log(time):
    logging.basicConfig(filename=f'{time}.log',
                        level=logging.DEBUG,
                        filemode='w+',
                        format='%(filename)s->%(levelname)s->%(asctime)s->%(message)s'
                        )
def emall(file):
    emal = yagmail.SMTP(host='smtp.qq.com',user='2410811597@qq.com',password='uzwlvaboffeqecfh')
    emal.send(to='2410811597@qq.com',subject='酒仙网系统Web Ui自动化测试报告',contents='两条购物测和功能测试用例',attachments=file)
def read_yaml(filename):
    with open(filename,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)